package com.chaos.order.api.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @author: craywen
 * @date: 2021-05-27 11:19
 * @desc: 支付错误枚举
 */
public enum PayErrorCodeEnum {



	//Pay(2300000-2310000) 公共参数
	PAY_ERROR_CODE_2300000(2300000,"请求参数不合法，请检查参数"),
	PAY_ERROR_CODE_2300001(2300001,"订单号不合法，请检查参数"),
	PAY_ERROR_CODE_2300002(2300002,"请求订单号不合法，请检查参数"),
	PAY_ERROR_CODE_2300003(2300003,"订单状态不合法，请检查参数"),

	//Pay(2310000-2320000) 业务参数
	PAY_ERROR_CODE_2310000(-2310000,"等待超时，请重新请求"),
	PAY_ERROR_CODE_2310001(-2310001,"支付方式不存在"),
	PAY_ERROR_CODE_2310002(-2310002,"查询支付信息失败！请重新请求"),
	PAY_ERROR_CODE_2310003(-2310003,"查询支付信息失败！请重新请求"),
	PAY_ERROR_CODE_2310004(-2310004,"提交退款信息失败！请重新请求"),
	PAY_ERROR_CODE_2310005(-2310004,"提交退款信息失败！请重新请求"),
	PAY_ERROR_CODE_2310006(-2310006,"支付方式不存在"),
	PAY_ERROR_CODE_2310007(-2310007,"提交支付失败"),

	// 订单创建错误校验
	ORDER_ERROR_CODE_2320000(2320000,"账户余额不能少于5元"),
	ORDER_ERROR_CODE_2320001(2320001,"十分抱歉!您有“待支付”的订单"),
	ORDER_ERROR_CODE_2320002(2320002,"十分抱歉!您有“充电中”的订单"),


	//退款错错误
	REFUND_ERROR_CODE_2420000(-2420000,"退款失败")

	;

	@Setter
	@Getter
	private Integer code;

	@Setter
	@Getter
	private String desc;
	PayErrorCodeEnum(Integer code, String desc){
		this.setCode(code) ;
		this.setDesc(desc);
	}


}
